Repository navigation
Lowercase Docker image repository names in workflows and build.sh - #18
Merged
Merged
Conversation
|
Your organization has run out of review credits. Add credits to resume code reviews. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant WF as GitHub Workflow (pr.yaml/release.yaml)
participant MA as docker/metadata-action@v6
participant SH as build.sh
participant DKR as Docker CLI/daemon
participant REG as GHCR Registry
Note over WF,REG: Image reference normalization flow
alt PR workflow (pr.yaml)
WF->>WF: NEW: Compute lowercased image name<br/>(tr uppercase->lowercase)
WF->>MA: Pass lowercased image name
MA->>MA: Generate tags (sha-xxxxxxx)
MA-->>WF: Normalized image refs
else Release workflow (release.yaml)
WF->>WF: NEW: Compute lowercased IMAGE inline
WF->>REG: docker buildx imagetools create<br/>with normalized image ref
end
Note over SH,DKR: build.sh local build path
SH->>SH: normalize_image_ref()<br/>NEW: lowercase repo name<br/>preserve tag, digest, port
SH->>DKR: docker pull (normalized IMAGE_REF)
alt Pull succeeds
DKR-->>SH: Image found
SH->>DKR: docker run (normalized IMAGE_REF)
else Pull fails
DKR-->>SH: Not found (silent fallback)
SH->>SH: Build locally from source
SH->>DKR: docker run (locally built)
end
SH->>SH: Generate output (fonts, iddfile)
SH-->>WF: Build artifacts
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThis PR lowercases Docker repository paths while keeping registry names, tags, and digests unchanged.
No actionable issues were found. This review used source inspection; tests were not run. Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16.
Problem
Docker image repository names must be lowercase, whereas
github.repositorypreserves owner/repository casing (e.g.TaivasJumala/iosevka-nerd-font)..github/workflows/release.yamlstill constructedIMAGE: ghcr.io/${{ github.repository }}and passed it directly todocker buildx imagetools create, failing for any owner/repo with uppercase letters..github/workflows/pr.yamldefinedIMAGE: ghcr.io/${{ github.repository }}at workflow scope (only working since11e50bcbecausedocker/metadata-action@v6internally lowercasesimages).build.shpassedIMAGEandIMAGE_REFdirectly todocker pullanddocker runwithout lowercasing the repository name, so mixed-case values faildocker run(or silently fall back to local builds duringdocker pull).Changes
.github/workflows/release.yaml: Remove top-levelIMAGEand lowercasegithub.repositorybeforedocker buildx imagetools create..github/workflows/pr.yaml: Remove top-levelIMAGEand pass an explicitly lowercased image name todocker/metadata-action@v6.build.sh: Addnormalize_image_ref()to lowercase the repository name in bothIMAGEandIMAGE_REFwhile preserving registry ports, tag casing, and digests (compatible with Bash 3.2+).tests/test_build_cache.py: Add unit tests covering mixed-caseIMAGE_REFandIMAGEinputs (tags, registry ports, digests, and image IDs).Verification
uv run python -m unittest discover -s tests -v— 12/12 passed/bin/bash -n build.shandtest_build_cache.pyunder macOS/bin/bash3.2 — passedpr.yaml,release.yaml, andfork-release.yamlSummary by cubic
Fixes #16 by lowercasing Docker image repository names so builds work with mixed-case GitHub owners or repositories.
github.repositorywhen creating image names.build.shlowercases repository paths while preserving registry domains, tags, digests, and image IDs.Written for commit d322d1e. Summary will update on new commits.